package com.myTimeUtils.android.TimeTracker.System;
import android.util.Log;
/**
 * Defines the PC system dependent portion of the timer.
 *
 * @author Joseph Walker
 */
public class ConcreteTimer extends Timer implements Runnable{
	private Thread thread;
	/**
	 * Constructs a PC timer.
	 */
	public ConcreteTimer(){
		super();
		this.thread = new Thread(this);
	}	
	/**
	 * Defines how this timer works.
	 */
	public void run(){
		while(true){
			try{ 
				Thread.sleep(1000);
				this.alertObservers();
				Log.d("Process", "Tick");
			}
			catch(InterruptedException e){}
		}
	}
	/**
	 * Starts the timer.
	 */
	public void start(){
		this.thread.start();
	}
}
